<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.js"></script>
</head>
<body>
    
</body>
</html>
<script>
    //lodash:目前位置防抖、节流
    //数组去重:基本类型数据去重
    let arr = [1,2,1,2,1];
    console.log(_.uniq(arr));
   //数组去重:uniq去重数组里面元素是基本类型数据
    let arr1 = [{a:1},{a:2},{a:3},{a:1},{a:6},{a:2}];
    console.log(_.uniqBy(arr1,'a'));
</script>